/*
 * ForRentBO.java
 *
 * Created on March 28, 2007, 3:28 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.jjenkins.data;

/**
 * THis clas contains all the set and get methods
 * @author Josh
 */
public class ForRentBO extends PhysicalBO{
    
    private String currentRentalID = null;
    private int timesRented;
    
    /** Creates a new instance of ForRentBO */
    public ForRentBO() {
    }
    
    /**
     * Sets the currentRental
     * @param currentRental RentalBO
     */
    public void setCurrentRental(RentalBO currentRental){
        this.currentRentalID = currentRental.getId();
        setDirty(true);
    }
    
    /**
     * Gets the currentRental
     * @throws edu.byu.isys413.jjenkins.data.DataException 
     * @return RentalBO
     */
    public RentalBO getCurrentRental() throws DataException{
        return (RentalBO)RentalDAO.getInstance().read(currentRentalID);
    }
    
    /**
     * sets the currentRental id
     * @param currentRentalID String
     */
    public void setCurrentRentalID(String currentRentalID){
        this.currentRentalID = currentRentalID;
        setDirty(true);
    }
    
    /**
     * Gets the currentRental id
     * @return String
     */
    public String getCurrentRentalID(){
        return currentRentalID;
    }
    
    /**
     * Sets the number of times rented
     * @param timesRented int
     */
    public void setTimesRented(int timesRented){
        this.timesRented = timesRented;
        setDirty(true);
    }
    
    /**
     * Gets the number of times rented
     * @return int
     */
    public int getTimesRented(){
        return timesRented;
    }
}
